<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<ul>
    <li id="addEvent">red</li>
    <li id="onClick">yellow</li>
</ul>
<script type="text/javascript">
    window.onload=function(){
        (function(){
           var addEvent = document.getElementById('addEvent');
           addEvent.addEventListener('click',function(){
               alert("我是addEvent1");
           },false);
            addEvent.addEventListener('click',function(){
                alert("我是addEvent2");
            },false);
            var onClick=document.getElementById('onClick');
            onClick.onclick=function(){
                alert("我是onClick1");
            };
            onClick.onclick=function(){
                alert("我是onClick2");
            };
        })();
    }
</script>
</body>
</html>